<template>
  <el-form
    ref="form"
    :inline="true"
    :model="searchForm"
    :rules="rules"
    :disabled="isDisabled"
  >
    <el-form-item label="单据类型">
      <BillTemplateTypeSelect
        v-model="searchForm.lngreceipttypeid"
      />
    </el-form-item>
    <el-form-item label="单据模板" prop="strbilltemplatename">
      <el-input
        v-model.trim="searchForm.strbilltemplatename"
        style="width:160px"
        placeholder="请输入"
      />
    </el-form-item>

    <el-form-item label="状态">
      <StatesSelect
        v-model="searchForm.blnisinactive"
      />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" icon="el-icon-search" @click="onSearch">查询</el-button>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  name: 'BillTemplateFilterTool',
  data() {
    return {
      // 是否禁用
      isDisabled: !!this.$route.query.isDisabled,
      // 查询条件
      searchForm: {
        blnisinactive: '0',
        lngreceipttypeid: '',
        strbilltemplatename: ''
      },
      // 必填规则
      rules: {
      },
      // 下拉框
      optionList: [
        { label: '测试1', value: '1' }
      ],
      // 树下拉框
      treeList: []

    }
  },
  computed: {
  },
  created() {
  },
  mounted() {
    this.$emit('search', this.searchForm)
  },
  methods: {
    // 查询
    onSearch() {
      this.$emit('search', this.searchForm)
    }
  }
}
</script>

